xend: canonicalise symlinks found in /dev for vbds (helps vscsi)
authorJames Harper <james.harper@bendigoit.com.au>
Tue, 8 Feb 2011 16:35:35 +0000 (16:35 +0000)
committerJames Harper <james.harper@bendigoit.com.au>
Tue, 8 Feb 2011 16:35:35 +0000 (16:35 +0000)
commit31960417a919c6d883547e1f6c73bd90f0d2ef03
tree401fe402c0823917af6b880c7f2121021788754f
parent090b27a6fad8561bb18a4b25dfd2a945bc361121
xend: canonicalise symlinks found in /dev for vbds (helps vscsi)

By default, vscsi expects to be passed the final device name (eg
/dev/st3) instead of one of the various udev symlinks (eg
/dev/tape/by-path/pci-0000:01:08.0-scsi-0:0:2:0-st). The following patch
resolves the path to the real path if the name starts with /dev/

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/python/xen/util/vscsi_util.py